Skip to content

fix: Remove dead __BUILTINS__ constant#461

Merged
jsonbailey merged 2 commits into
mainfrom
jb/sdk-2692/remove-dead-builtins
Jul 17, 2026
Merged

fix: Remove dead __BUILTINS__ constant#461
jsonbailey merged 2 commits into
mainfrom
jb/sdk-2692/remove-dead-builtins

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Stacked on #460 (async evaluator). Review/merge that first; this PR's diff is against that branch.

What

Removes the dead module-level __BUILTINS__ constant from its three locations — referenced nowhere:

  • ldclient/impl/evaluator_common.py
  • ldclient/impl/util.py
  • ldclient/__init__.py

Why

It went dead in 1d9769b ("prepare 8.0.0 release", 2022-12-30): the contexts migration deleted its only consumer (_get_user_attribute) but left the definition behind — an incidental missed cleanup. It has had no readers since.

Non-breaking

Not in any __all__, not imported or re-exported anywhere, uses the private __NAME__ convention, and zero references across the tree. No public API change; no major version bump. (Surfaced while auditing the evaluator sync/async duplication in #460.)

Validation

  • uv run mypy ldclient — clean
  • uv run pytest ldclient/testing/impl/test_evaluator.py ldclient/testing/impl/test_util.py — 20 passed
  • pycodestyle / isort — clean
  • import ldclient smoke — OK

SDK-2692 (epic SDK-60).


Note

Low Risk
Dead-code removal with no public API or evaluator behavior changes; only a documentation comment on logging.

Overview
Deletes the dead __BUILTINS__ module constants from ldclient/__init__.py, ldclient/impl/evaluator_common.py, and ldclient/impl/util.py. Those lists were left over after the contexts migration and are not referenced anywhere in the tree.

In ldclient/impl/util.py, adds a short comment on the ldclient.util logger name, pointing to SDK-2696 for a future cleanup.

Reviewed by Cursor Bugbot for commit 461e621. Bugbot is set up for automated code reviews on this repo. Configure here.

@jsonbailey
jsonbailey marked this pull request as ready for review July 17, 2026 15:04
@jsonbailey
jsonbailey requested a review from a team as a code owner July 17, 2026 15:04
@jsonbailey
jsonbailey force-pushed the jb/sdk-2692/remove-dead-builtins branch from f42c964 to 91f032a Compare July 17, 2026 16:07
Base automatically changed from jb/sdk-2688/async-evaluator to main July 17, 2026 16:34
@jsonbailey
jsonbailey force-pushed the jb/sdk-2692/remove-dead-builtins branch from 91f032a to 461e621 Compare July 17, 2026 16:36
@jsonbailey jsonbailey changed the title chore: Remove dead __BUILTINS__ constant fix: Remove dead __BUILTINS__ constant Jul 17, 2026
@jsonbailey
jsonbailey merged commit eb0ecfd into main Jul 17, 2026
15 checks passed
@jsonbailey
jsonbailey deleted the jb/sdk-2692/remove-dead-builtins branch July 17, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants